#pragma once

#include <d3d9.h>


namespace D3DUtil
{
void Quad2d(float x1, float y1, float x2, float y2, unsigned int color);
void Quad3d(float x1, float y1, float x2, float y2, float z, unsigned int color);
inline void Quad2da(float x1, float y1, float x2, float y2, unsigned int color, float al)
{
	if (al<0) al=0;
	if (al>1) al=1;
	Quad2d(x1,y1,x2,y2,(color&0xffffff)|(int(al*255.0f)<<24));
}

void SetRenderTarget(int target, LPDIRECT3DSURFACE9 tex);
void SetRenderTarget(int target, LPDIRECT3DTEXTURE9 tex);
}